This sample uses the ConceptDraw Basic scripting language to build graphs of several trigonometric functions.
The document contains shapes for coordinate axes and the legend for the graphs. Once the procedure has been started, all shapes except the ones mentioned above are deleted from the document (the shapes left in the document are located on the "Axis" layer). Then the graphs of the following functions are drawn: y=sin(x), y=cos(x), y=tg(x) and y=arctg(x)). The graphs are approximated with the help of polygons. For periodic functions the graphs are drawn for just one period of the argument.
The DrawDiagram() procedure is located in the external module DrawDiagram.cdb and is called from a document-level script. If the "Enable ConceptDraw Basic script autorun" flag is not set in the Preferences dialog of ConceptDraw, the script can be run from the ConceptDraw Basic editor (Tools->ConceptDraw Basic->Document Script->Edit) from the Build->Run menu.